﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="PlatiSpreAchitare.aspx.cs" Inherits="PlatiSpreAchitare" EnableEventValidation="false" %>
<%@ Register TagPrefix="lsd" TagName="LoanSelectionDialog" Src="~/Controls/LoanSelectionDialog.ascx" %>

<asp:Content ID="ClassifiersContnet" ContentPlaceHolderID="MainContent" Runat="Server">

    <asp:Panel ID="emptyPanel" runat="server" visible="false">
        <div align="center">
            <h1 >Plati spre achitare</h1>
        </div>
    </asp:Panel>
        
    <lsd:LoanSelectionDialog ID="loanSelectionDialog" runat="server" OnOnClientSelected="loanSelectionDialog_Selected" />

    <asp:UpdatePanel ID="previewPanel" runat="server" Visible="false">
        <ContentTemplate>    
            <asp:Label runat="server" Text="Sumele spre achitare"></asp:Label>
            <div class="table">
                <div class="row">
                    <div class="cell">La data</div> 
                    <div class="cell"><asp:Label ID="dateNowLabel" runat="server"></asp:Label></div>
                    <div class="cell"></div> 
                    <div class="cell" ></div> 
                </div>
                <div class="row">
                    <div class="cell">Client</div> 
                    <div class="cell" style="padding-left:5px;"><asp:Label ID="clientNameLabel" runat="server"></asp:Label></div>
                    <div class="cell" style="padding-left:15px;">Contract nr.</div> 
                    <div class="cell" style="padding-left:5px;"><asp:Label ID="loanNrLabel" runat="server"></asp:Label></div> 
                </div>
                <div class="row">
                    <div class="cell">Curs la acordare</div> 
                    <div class="cell" style="padding-left:5px;"><asp:Label ID="loanInitialChangeRateLabel" runat="server"></asp:Label></div>
                    <div class="cell" style="padding-left:15px;">Curs la achitare</div> 
                    <div class="cell" style="padding-left:5px;"><asp:Label ID="loanRealChangeRate" runat="server"></asp:Label></div> 
                </div>
            </div>

            <br />

            <asp:GridView ID="previewLoanGridView" runat="server" 
                AutoGenerateColumns="False"  
                CssClass="mGrid"
                PagerStyle-CssClass="pgr"
                onrowdatabound="previewLoanGridView_RowDataBound" 
                ShowFooter="True">
                <Columns>
                    <asp:BoundField DataField="iterationID" HeaderText="Nr." HtmlEncode="False" >
                    </asp:BoundField>

                    <asp:TemplateField HeaderText="Data">
                        <ItemTemplate>
                            <asp:Label ID="dataLabel" runat="server" 
                                Text='<%# ((Eval("calculatedData") != null && Eval("calculatedData") is DateTime) ?  ((DateTime)Eval("calculatedData")).ToString(Constants.Constants.ISODateBackwardDotsFormat) : "") %>'></asp:Label>
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Label ID="totalLabel" runat="server" Text="Totaluri:" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>
                                                
                    <asp:TemplateField  HeaderText="Rata Imprumutului" >
                        <ItemTemplate>                        
                            <asp:Label ID="rateAmountLabel" runat="server" Text='<%# Bind("mainRate_Rated") %>'></asp:Label> 
                        </ItemTemplate>
                            <FooterTemplate>
                            <asp:Label ID="totalRateAmountLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>      
                                                                
                    <asp:TemplateField  HeaderText="Dobinda" >
                        <ItemTemplate>                        
                            <asp:Label ID="percentAmountLabel" runat="server" Text='<%# Bind("percentValue_Rated") %>'></asp:Label> 
                        </ItemTemplate>
                            <FooterTemplate>
                            <asp:Label ID="totalPercentAmountLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>
                                 
                     
                    <asp:TemplateField  HeaderText="Penalitatea" >
                        <ItemTemplate>                        
                            <asp:Label ID="penaltyLabel" runat="server" Text='<%# Bind("additionalPays") %>'></asp:Label> 
                        </ItemTemplate>
                            <FooterTemplate>
                            <asp:Label ID="totalPenaltyLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField  HeaderText="Corectia la curs" >
                        <ItemTemplate>                        
                            <asp:Label ID="rateCorrectionLabel" runat="server" Text='<%# Bind("corectiaLaCurs") %>'></asp:Label> 
                        </ItemTemplate>
                            <FooterTemplate>
                            <asp:Label ID="totalrateCorrectionLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>

                    <asp:TemplateField  HeaderText="Comision ad." >
                        <ItemTemplate>                        
                            <asp:Label ID="comisionAdmLabel" runat="server" Text='<%# Bind("comisionAdm") %>'></asp:Label> 
                        </ItemTemplate>
                            <FooterTemplate>
                            <asp:Label ID="totalComisionAdmLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>                                

                    <asp:TemplateField  HeaderText="Total, lei" >
                        <ItemTemplate>                        
                            <asp:Label ID="totalAmountLabel" runat="server" Text='<%# Bind("totalAmount_Rated") %>'></asp:Label> 
                        </ItemTemplate>
                            <FooterTemplate>
                            <asp:Label ID="totalTotalAmountLabel" runat="server" Text="" CssClass="tableFooter"></asp:Label>
                        </FooterTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
   
       </ContentTemplate>
    </asp:UpdatePanel>

</asp:Content>



